package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

public class ChartCollection extends CollectionBase {
   private Worksheet b;

   ChartCollection(Worksheet sheet) {
      this.b = sheet;
   }

   Worksheet a() {
      return this.b;
   }

   public int addFloatingChart(int type, int left, int top, int width, int height) {
      Chart var6 = new Chart(this.b, type);
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var6);
      this.b.getShapes().c(var6.getChartObject());
      if (this.b.getType() == 2) {
         var6.getChartObject().a(0, false, 0, 0, 900, 600);
      } else {
         var6.getChartObject().a(0, false, left, top, width, height);
      }

      return this.getCount() - 1;
   }

   public int add(int type, int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn) {
      Chart var6 = new Chart(this.b, type);
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var6);
      this.b.getShapes().c(var6.getChartObject());
      if (this.b.getType() == 2) {
         var6.getChartObject().a(0, false, 0, 0, 900, 600);
      } else {
         var6.getChartObject().moveToRange(upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn);
      }

      return this.getCount() - 1;
   }

   int a(int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
      Chart var8 = new Chart(this.b, var1);
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var8);
      this.b.getShapes().c(var8.getChartObject());
      if (this.b.getType() == 2) {
         var8.getChartObject().a(0, false, 0, 0, 900, 600);
      } else {
         var8.getChartObject().a(var2, var3, var4, var5, var6, var7);
      }

      return this.getCount() - 1;
   }

   public Chart get(int index) {
      return (Chart)this.a.get(index);
   }

   public Chart get(String name) {
      for(int var2 = 0; var2 < this.getCount(); ++var2) {
         Chart var3 = this.get(var2);
         String var4 = var3.getName();
         if (var4 != null && com.aspose.cells.b.a.zv.b(var4, name)) {
            return var3;
         }
      }

      return null;
   }

   void b() {
      Iterator var1 = this.iterator();

      while(var1.hasNext()) {
         Chart var2 = (Chart)var1.next();
         Iterator var3 = var2.getNSeries().iterator();

         while(var3.hasNext()) {
            Series var4 = (Series)var3.next();
            if (var4.l() != null && var4.l().f() != null) {
               var4.l().r();
            }

            if (var4.m() != null && var4.m().f() != null) {
               var4.m().r();
            }

            if (var4.n() != null && var4.n().f() != null) {
               var4.n().r();
            }
         }
      }

   }

   void a(int var1, int var2, Worksheet var3, boolean var4) {
      Object var5 = null;
      Iterator var6 = this.iterator();

      while(var6.hasNext()) {
         Chart var7 = (Chart)var6.next();
         Iterator var8 = var7.getNSeries().iterator();

         while(var8.hasNext()) {
            Series var9 = (Series)var8.next();
            Object var10 = var9.k();
            byte[] var11;
            if (var10 != null && var10 instanceof byte[]) {
               var11 = (byte[])((byte[])var10);
               zyo.a(var3, var4, var1, var2, 0, 0, -1, -1, var11);
            }

            if (var9.l() != null && var9.l().f() != null) {
               var11 = var9.l().f();
               zyo.a(var3, var4, var1, var2, 0, 0, -1, -1, var11);
               if (var9.l().d() != null && var9.l().a()) {
                  var9.l().a((ArrayList)null);
               }
            }

            if (var9.m() != null && var9.m().f() != null) {
               var11 = var9.m().f();
               zyo.a(var3, var4, var1, var2, 0, 0, -1, -1, var11);
               if (var9.m().d() != null && var9.m().a()) {
                  var9.m().a((ArrayList)null);
               }
            }

            if (var9.n() != null && var9.n().f() != null) {
               var11 = var9.n().f();
               zyo.a(var3, var4, var1, var2, 0, 0, -1, -1, var11);
            }
         }
      }

   }

   void a(ChartCollection var1, int var2, int var3, int var4) {
   }

   void b(int var1, int var2, Worksheet var3, boolean var4) {
      Object var5 = null;
      Iterator var6 = this.iterator();

      while(var6.hasNext()) {
         Chart var7 = (Chart)var6.next();
         Iterator var8 = var7.getNSeries().iterator();

         while(var8.hasNext()) {
            Series var9 = (Series)var8.next();
            Object var10 = var9.k();
            byte[] var11;
            if (var10 != null && var10 instanceof byte[]) {
               var11 = (byte[])((byte[])var10);
               zyo.c(var3, var4, var1, var2, 0, 0, -1, -1, var11);
            }

            if (var9.l() != null && var9.l().f() != null) {
               var11 = var9.l().f();
               zyo.c(var3, var4, var1, var2, 0, 0, -1, -1, var11);
            }

            if (var9.m() != null && var9.m().f() != null) {
               var11 = var9.m().f();
               zyo.c(var3, var4, var1, var2, 0, 0, -1, -1, var11);
            }

            if (var9.n() != null && var9.n().f() != null) {
               var11 = var9.n().f();
               zyo.c(var3, var4, var1, var2, 0, 0, -1, -1, var11);
            }
         }
      }

   }

   void a(CellArea var1, int var2, int var3, Worksheet var4, boolean var5) {
      Object var6 = null;
      Iterator var7 = this.iterator();

      while(var7.hasNext()) {
         Chart var8 = (Chart)var7.next();
         Iterator var9 = var8.getNSeries().iterator();

         while(var9.hasNext()) {
            Series var10 = (Series)var9.next();
            Object var11 = var10.k();
            byte[] var12;
            if (var11 != null && var11 instanceof byte[]) {
               var12 = (byte[])((byte[])var11);
               zyo.a(var1, var2, var3, var4, var5, var12, -1, -1, 0, 0, 0, 0);
            }

            if (var10.l() != null && var10.l().f() != null) {
               var12 = var10.l().f();
               zyo.a(var1, var2, var3, var4, var5, var12, -1, -1, 0, 0, 0, 0);
            }

            if (var10.m() != null && var10.m().f() != null) {
               var12 = var10.m().f();
               zyo.a(var1, var2, var3, var4, var5, var12, -1, -1, 0, 0, 0, 0);
            }

            if (var10.n() != null && var10.n().f() != null) {
               var12 = var10.n().f();
               zyo.a(var1, var2, var3, var4, var5, var12, -1, -1, 0, 0, 0, 0);
            }
         }
      }

   }

   void a(HashMap var1) {
      Object var2 = null;
      Iterator var3 = this.iterator();

      while(var3.hasNext()) {
         Chart var4 = (Chart)var3.next();
         Iterator var5 = var4.getNSeries().iterator();

         while(var5.hasNext()) {
            Series var6 = (Series)var5.next();
            Object var7 = var6.k();
            byte[] var8;
            if (var7 != null && var7 instanceof byte[]) {
               var8 = (byte[])((byte[])var7);
               zyo.b(var8, -1, -1, var1, this.b.c());
            }

            if (var6.l() != null && var6.l().f() != null) {
               var8 = var6.l().f();
               zyo.b(var8, -1, -1, var1, this.b.c());
            }

            if (var6.m() != null && var6.m().f() != null) {
               var8 = var6.m().f();
               zyo.b(var8, -1, -1, var1, this.b.c());
            }

            if (var6.n() != null && var6.n().f() != null) {
               var8 = var6.n().f();
               zyo.b(var8, -1, -1, var1, this.b.c());
            }
         }
      }

   }

   boolean a(int var1) {
      HashMap var2 = new HashMap();
      var2.put(var1, zml.e);
      this.b(var2);
      return (Boolean)var2.get(var1);
   }

   void b(HashMap var1) {
      Object var2 = null;
      Iterator var3 = this.iterator();

      while(var3.hasNext()) {
         Chart var4 = (Chart)var3.next();
         Iterator var5 = var4.getNSeries().iterator();

         while(var5.hasNext()) {
            Series var6 = (Series)var5.next();
            Object var7 = var6.k();
            byte[] var8;
            if (var7 != null && var7 instanceof byte[]) {
               var8 = (byte[])((byte[])var7);
               zyo.a(var8, -1, -1, (HashMap)var1, (WorksheetCollection)this.b.c());
            }

            if (var6.l() != null && var6.l().f() != null) {
               var8 = var6.l().f();
               zyo.a(var8, -1, -1, (HashMap)var1, (WorksheetCollection)this.b.c());
            }

            if (var6.m() != null && var6.m().f() != null) {
               var8 = var6.m().f();
               zyo.a(var8, -1, -1, (HashMap)var1, (WorksheetCollection)this.b.c());
            }

            if (var6.n() != null && var6.n().f() != null) {
               var8 = var6.n().f();
               zyo.a(var8, -1, -1, (HashMap)var1, (WorksheetCollection)this.b.c());
            }
         }
      }

   }

   void a(Chart var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
   }

   public void remove(Chart chart) {
      this.a.remove(chart);
   }

   public void removeAt(int index) {
      Chart var2 = this.get(index);
      if (this.b.getType() == 1) {
         this.b.getShapes().b(var2.getChartObject());
      } else {
         this.a.remove(index);
      }

   }

   void c() {
      this.a.clear();
   }

   public void clear() {
      if (this.getCount() > 0) {
         this.a.clear();

         for(int var1 = 0; var1 < this.b.getShapes().getCount(); ++var1) {
            Shape var2 = this.b.getShapes().get(var1);
            if (var2.getMsoDrawingType() == 5) {
               this.b.getShapes().a(var2);
               --var1;
            }
         }
      }

   }

   static boolean b(int var0) {
      switch(var0) {
      case 3:
      case 4:
      case 5:
      case 9:
      case 10:
      case 11:
      case 13:
      case 17:
      case 18:
      case 19:
      case 20:
      case 21:
      case 22:
      case 23:
      case 24:
      case 25:
      case 26:
      case 27:
      case 28:
      case 29:
      case 30:
      case 31:
      case 32:
      case 33:
      case 34:
      case 43:
      case 45:
      case 48:
      case 50:
      case 51:
      case 52:
      case 53:
      case 54:
      case 55:
      case 56:
      case 69:
      case 70:
      case 71:
      case 72:
         return true;
      case 6:
      case 7:
      case 8:
      case 12:
      case 14:
      case 15:
      case 16:
      case 35:
      case 36:
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      case 42:
      case 44:
      case 46:
      case 47:
      case 49:
      case 57:
      case 58:
      case 59:
      case 60:
      case 61:
      case 62:
      case 63:
      case 64:
      case 65:
      case 66:
      case 67:
      case 68:
      default:
         return false;
      }
   }

   static boolean a(int var0, int var1) {
      if (var0 == var1) {
         return true;
      } else {
         switch(var0) {
         case 0:
         case 1:
         case 2:
         case 3:
         case 4:
         case 5:
            switch(var1) {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
               return true;
            default:
               return false;
            }
         case 6:
         case 7:
         case 8:
         case 9:
         case 10:
         case 11:
            switch(var1) {
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
            case 11:
               return true;
            default:
               return false;
            }
         case 12:
         case 13:
            switch(var1) {
            case 12:
            case 13:
               return true;
            default:
               return false;
            }
         case 14:
         case 15:
         case 16:
         case 17:
         case 18:
         case 19:
         case 20:
            switch(var1) {
            case 14:
            case 15:
            case 16:
            case 17:
            case 18:
            case 19:
            case 20:
               return true;
            default:
               return false;
            }
         case 21:
         case 22:
         case 23:
         case 24:
         case 25:
         case 26:
         case 27:
            switch(var1) {
            case 21:
            case 22:
            case 23:
            case 24:
            case 25:
            case 26:
            case 27:
               return true;
            default:
               return false;
            }
         case 28:
         case 29:
         case 30:
         case 31:
         case 32:
         case 33:
         case 34:
            switch(var1) {
            case 28:
            case 29:
            case 30:
            case 31:
            case 32:
            case 33:
            case 34:
               return true;
            default:
               return false;
            }
         case 35:
         case 36:
            switch(var1) {
            case 35:
            case 36:
               return true;
            default:
               return false;
            }
         case 37:
         case 38:
         case 39:
         case 40:
         case 41:
         case 42:
         case 43:
            switch(var1) {
            case 37:
            case 38:
            case 39:
            case 40:
            case 41:
            case 42:
            case 43:
               return true;
            default:
               return false;
            }
         case 44:
         case 45:
         case 46:
         case 47:
         case 48:
         case 49:
            switch(var1) {
            case 44:
            case 45:
            case 46:
            case 47:
            case 48:
            case 49:
               return true;
            default:
               return false;
            }
         case 50:
         case 51:
         case 52:
         case 53:
         case 54:
         case 55:
         case 56:
            switch(var1) {
            case 50:
            case 51:
            case 52:
            case 53:
            case 54:
            case 55:
            case 56:
               return true;
            default:
               return false;
            }
         case 57:
         case 58:
         case 59:
            switch(var1) {
            case 57:
            case 58:
            case 59:
               return true;
            default:
               return false;
            }
         case 60:
         case 61:
         case 62:
         case 63:
         case 64:
            switch(var1) {
            case 60:
            case 61:
            case 62:
            case 63:
            case 64:
               return true;
            default:
               return false;
            }
         case 65:
         case 66:
         case 67:
         case 68:
            switch(var1) {
            case 65:
            case 66:
            case 67:
            case 68:
               return true;
            default:
               return false;
            }
         case 69:
         case 70:
         case 71:
         case 72:
            switch(var1) {
            case 69:
            case 70:
            case 71:
            case 72:
               return true;
            default:
               return false;
            }
         default:
            return false;
         }
      }
   }

   static boolean b(int var0, int var1) {
      if (var0 == var1) {
         return true;
      } else if (!b(var0) && !b(var0)) {
         switch(var0) {
         case 0:
         case 1:
         case 2:
         case 14:
         case 15:
         case 16:
         case 37:
         case 38:
         case 39:
         case 40:
         case 41:
         case 42:
         case 60:
         case 61:
         case 62:
         case 63:
         case 64:
            switch(var1) {
            case 0:
            case 1:
            case 2:
            case 14:
            case 15:
            case 16:
            case 37:
            case 38:
            case 39:
            case 40:
            case 41:
            case 42:
            case 60:
            case 61:
            case 62:
            case 63:
            case 64:
               return true;
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
            case 11:
            case 12:
            case 13:
            case 17:
            case 18:
            case 19:
            case 20:
            case 21:
            case 22:
            case 23:
            case 24:
            case 25:
            case 26:
            case 27:
            case 28:
            case 29:
            case 30:
            case 31:
            case 32:
            case 33:
            case 34:
            case 35:
            case 36:
            case 43:
            case 44:
            case 45:
            case 46:
            case 47:
            case 48:
            case 49:
            case 50:
            case 51:
            case 52:
            case 53:
            case 54:
            case 55:
            case 56:
            case 57:
            case 58:
            case 59:
            default:
               return false;
            }
         case 3:
         case 4:
         case 5:
         case 9:
         case 10:
         case 11:
         case 12:
         case 13:
         case 17:
         case 18:
         case 19:
         case 20:
         case 21:
         case 22:
         case 23:
         case 24:
         case 25:
         case 26:
         case 27:
         case 28:
         case 29:
         case 30:
         case 31:
         case 32:
         case 33:
         case 34:
         case 43:
         case 45:
         case 47:
         case 48:
         case 50:
         case 51:
         case 52:
         case 53:
         case 54:
         case 55:
         case 56:
         default:
            return false;
         case 6:
         case 7:
         case 8:
            switch(var1) {
            case 6:
            case 7:
            case 8:
               return true;
            default:
               return false;
            }
         case 35:
         case 36:
            switch(var1) {
            case 35:
            case 36:
               return true;
            default:
               return false;
            }
         case 44:
         case 46:
         case 49:
            switch(var1) {
            case 44:
            case 46:
            case 49:
               return true;
            default:
               return false;
            }
         case 57:
         case 58:
            switch(var1) {
            case 57:
            case 58:
               return true;
            default:
               return false;
            }
         case 59:
            switch(var1) {
            case 59:
               return true;
            default:
               return false;
            }
         }
      } else {
         throw new IllegalArgumentException("You could not combin 2-D and 3-D chart types");
      }
   }

   static boolean c(int var0) {
      switch(var0) {
      case 44:
      case 45:
      case 46:
      case 47:
      case 48:
      case 49:
         return true;
      default:
         return false;
      }
   }

   static boolean d(int var0) {
      switch(var0) {
      case 35:
      case 36:
      case 44:
      case 45:
      case 46:
      case 47:
      case 48:
      case 49:
         return false;
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      case 42:
      case 43:
      default:
         return true;
      }
   }

   static boolean e(int var0) {
      switch(var0) {
      case 69:
      case 70:
      case 71:
      case 72:
         return true;
      default:
         return false;
      }
   }

   static boolean f(int var0) {
      switch(var0) {
      case 3:
      case 17:
      case 27:
      case 34:
      case 43:
      case 56:
      case 69:
      case 70:
      case 71:
      case 72:
         return true;
      default:
         return false;
      }
   }

   static boolean g(int var0) {
      switch(var0) {
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 11:
      case 14:
      case 15:
      case 16:
      case 17:
      case 18:
      case 19:
      case 20:
         return true;
      case 12:
      case 13:
      default:
         return false;
      }
   }

   static boolean h(int var0) {
      switch(var0) {
      case 6:
      case 7:
      case 8:
      case 9:
      case 10:
      case 11:
         return true;
      default:
         return false;
      }
   }

   static boolean i(int var0) {
      switch(var0) {
      case 1:
      case 4:
      case 7:
      case 10:
      case 15:
      case 19:
      case 22:
      case 25:
      case 29:
      case 32:
      case 38:
      case 41:
      case 51:
      case 54:
         return true;
      case 2:
      case 3:
      case 5:
      case 6:
      case 8:
      case 9:
      case 11:
      case 12:
      case 13:
      case 14:
      case 16:
      case 17:
      case 18:
      case 20:
      case 21:
      case 23:
      case 24:
      case 26:
      case 27:
      case 28:
      case 30:
      case 31:
      case 33:
      case 34:
      case 35:
      case 36:
      case 37:
      case 39:
      case 40:
      case 42:
      case 43:
      case 44:
      case 45:
      case 46:
      case 47:
      case 48:
      case 49:
      case 50:
      case 52:
      case 53:
      default:
         return false;
      }
   }

   static boolean j(int var0) {
      switch(var0) {
      case 9:
      case 10:
      case 11:
      case 17:
      case 18:
      case 19:
      case 20:
      case 21:
      case 22:
      case 23:
      case 24:
      case 25:
      case 26:
      case 27:
      case 28:
      case 29:
      case 30:
      case 31:
      case 32:
      case 33:
      case 34:
      case 50:
      case 51:
      case 52:
      case 53:
      case 54:
      case 55:
      case 56:
         return true;
      case 12:
      case 13:
      case 14:
      case 15:
      case 16:
      case 35:
      case 36:
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      case 42:
      case 43:
      case 44:
      case 45:
      case 46:
      case 47:
      case 48:
      case 49:
      default:
         return false;
      }
   }

   static boolean k(int var0) {
      switch(var0) {
      case 60:
      case 61:
      case 62:
      case 63:
      case 64:
         return true;
      default:
         return false;
      }
   }

   static boolean l(int var0) {
      switch(var0) {
      case 12:
      case 13:
      case 60:
      case 61:
      case 62:
      case 63:
      case 64:
         return true;
      default:
         return false;
      }
   }

   static boolean m(int var0) {
      switch(var0) {
      case 35:
      case 36:
         return true;
      default:
         return false;
      }
   }

   static boolean n(int var0) {
      switch(var0) {
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      case 42:
      case 43:
         return true;
      default:
         return false;
      }
   }

   static boolean o(int var0) {
      switch(var0) {
      case 57:
      case 58:
      case 59:
         return true;
      default:
         return false;
      }
   }

   static boolean p(int var0) {
      switch(var0) {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
         return true;
      default:
         return false;
      }
   }

   static boolean q(int var0) {
      switch(var0) {
      case 12:
      case 13:
         return true;
      default:
         return false;
      }
   }

   static boolean r(int var0) {
      switch(var0) {
      case 65:
      case 66:
      case 67:
      case 68:
         return true;
      default:
         return false;
      }
   }

   static boolean s(int var0) {
      switch(var0) {
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      case 42:
      case 43:
      case 60:
      case 61:
      case 62:
      case 63:
      case 64:
         return true;
      case 44:
      case 45:
      case 46:
      case 47:
      case 48:
      case 49:
      case 50:
      case 51:
      case 52:
      case 53:
      case 54:
      case 55:
      case 56:
      case 57:
      case 58:
      case 59:
      default:
         return false;
      }
   }
}
